added more server logic.