following optimizations performed: