Added code for hw3_e3