renaming framesData to frames and frames to numFrames