added exception testing