fixed step index for loading step image. some refactorings.