save locations in database