added printMessage