Added a function which finds the top left corner position