add lastep and firstep classes