updated CRUD functionality