performance improvements: custom mode