added editing functionality and other CRUD