renamed flex to flexOld