a bit of refactoring. prepare to deploy