bug fix
refactoring - exceptions