Testing to seeif I don't have to add. Trying to fix bad allocation. still no success in fixing occurrence handler.