improving patterns and performance