added homework solution and graphical outputs