button logic consolidation.