middle of refactoring into libraries