fix bug, used flag direclty instead of argument
added integration tests for the beer-search example