refactor exception hierarchy