added methods for getting GPS coordinates

plus some bug fixes