kapil task: reduced queries from 65 to 40