A few optimization