q refactor #1