implemented basic messaging functionality