add notfound as a flag of throw notfoundexception