extracted server class