hw1: add output function
hw1: initiate with only title