Optimization: Not iterating upwards from 0 every time