added exceptions to lib