changed redoFrames function to undoFrames and uncommented resetframes