add flexible mode