Add gotoXY function and output data.