server refectored