remove newline
Modify stepvals to take in a number of steps instead.
Add some optimizations...