x and y changed to top and left