add FLEX, minor adjustments