Homework assignment 2 code.