refactor into server class
0.2.0