moved message packet creation into sperate class