added onstacle and fps cap