changed coordinates in rotate square to make it form a square