additional polish and optimizations