implemented a simple message processor