template code for assignment 7