added edit and delete functions