be a bit smarter about stopping when we're done