partially implemented messaging; some restructuring... not workable yet