added an FPS cap, constant at top defines fps cap