hw6 implementation stub