finish part of msgQ.h