added messaging function