initial separation of concerns. moving into an npm module