spec for exceptions added
add logic testing