Consolidate logic