assignment 3 working as assignment 2