optimized some operations