Implemented a return function

Coordinates are now returned