refactored q func; need linear combination of q, upon softmax