UNIFY-FRAMES Implemented

May not be 100% correct but works for given testcases