added PrintMessage function