some little bits of optimization.