added exception raising and recueing