added code provided by TA.

code provided by TA will be a starting point for the assignment.