hw 5 refactored to handle closing price
hw6 example working