assgn 2 implementation