made optimizations