fixed the code: will now process the IN part of the SQL statement correctly