added exit at the end