Consolidate functions