added throw to the new exception handling