doing some code optimizations.