Added support for negative coordinates

On a suggestion from a user, I have added the support for negative
coordinates