finished version of hw5