need to find q_n