Wrote Task 1 code