fixed, added exceptions