refactor Exception classes