updated to flex