Added edit and delete functions