Initial implementation of hw5