clean up and added frame rate