Implement assignment 2