delete some rest tempDB in the function, need to perform the test again for the codes