exit statement now works