added delete and edit functions