finish CRUD functionality