finish main function
cp insert update delete query with observer notification