corrected for errors and changed step to 0.25