finish the main logic,the CRUD operations of the note