message processing re-write