refactor out of turkserver