extracted server into modules