Assignment1_P1_extended