edited exit statements to use raise