add comments to hw4 functions