constructors for client and server built