simplified creation of CRUD functions