hw1 moved output inside functor
hw1 fixed output char terminators