working on exception generation