added a dynamic schema query