factor out engineserver