add the flex support

laivi
2013-01-14
Merge branch 'flexBranch'