a few code improvements and optimizations