support flags
Merge pull request #17 from ahem/master

support flags