just some optimizations