removed debug log from sql query