Wrapped up code and testing for assignment