some optimizations
up