implemented set/get location and improved some error responses