Getting step number optimized