try to optimise the code but failed
succeed to optimise Stepwized()