There is a paper here http://www.denison.edu/academics/departments/mathcs/fressola_paper.pdf that seems to do what you want to achieve.