add update and delete location functions