code review fixes - improved query, removed debugger statement, removed redundant result save