added insert and delete location functionality