Refactor q -> text