use factory for messages