hw5, fixes for hw4