some optimizations steps on operations