implemented algo for initial step selection