refactored specs for exception