cleaned up the fps code