implemented a location recording, close #1882