Working on getting the cursor to work.  I think my query might be wrong