building the crud api