Consolidation into separate functions