changes for static query
changes for new structure