navagate qs logic