added edit and delete function