more function consolidation