adding exception handling class