optizamation output buff and break loop way