Improved flex test