encapsulating server function in servercore module