added recording of location