latitude and longitude offsets now possible
changed loop structure and removed debug statements