fix logic in example in readme