removed misplaced exit()