finalized the server class