add message class
connection managemanet barely works
improve