completed edit and delete functions