replaced deprecated location delegate method