Start of adding dynamic query layer