edit and delete functions working