handle exmotions as well