add delete and edit function