use exit rather than return