moved geo functions; added deferred promise