Updated version of PA1_template