Inclusion Criteria:  patients undergoing elective thoracotomy for any cause American Society of Anesthesiologists class I-III (ASA I-III)  Exclusion Criteria:  known allergy to local anesthetic local inflammation paravertebral tumor severe respiratory distress ( breathing dependence on accessory muscles) severe spinal deformities severe ipsilateral diaphragmatic paresis morbid obesity (BMI>35 kg/m2) blood coagulation disorders known contraindication for administration of ketamine or morphine psychiatric disorders severe cardiovascular disease systematic use of opioids due to chronic pain renal or hepatic failure patients who refuse to participate