added option to toggle ON/OFF DISTINCT in list select query