perf + consolidation of functionality