assignment 7, source code