adds edit and delete functionality