Updated the code for the CRUD