changed system to use framesizes instead of frame numbers