changed maximum step length to be relative to image size so it behaves the same for large and small images