fix issues & implement day3's work