Implemted add, update and delete functions