fixed problems and finished hw4