made example more generic