added message factory for decoding purposes