some perfomance optimizations