added fail condition if undefined step