removed old code and changed get_location to not pass locations and work by (pointer) reference