Added a new version of positionByFrameGen.rb