refactoring logic from app to board