changed end_trial q ESC