completed CRUD functions