Finish first implementation of hw5