added checking for distance between new and old location. removed delegate (part 1). refactor