adding exit 0 and correcting printing