care to explain this flow? why the exit 0 here?