added processed message field, create message function