fix for date comparison in query
remove test output