Converted Not() to use cursor