Effect of pain control algorithm on pain intensity and duration of patients' connection to the ventilator