CRUD logic