complete CRUD functions for both resources