get location and store it to database