Worked more on query processing for version 1