added color coding to Q-Function