Working on sorted fraction list generating function