done some fragmentation. separate different classes from server class