hw5: solutions - cleanup