added q_change function