made server a class