fixed syntax and rotation and location checking.