before query string refactoring