updating market groups
updating to use a hierachical query for market groups