Adding assignment 4 code.