moved the base server into a separate file