add message layer; fix group bug; need more testing