begin refactoring into services