add options to specify start and end point instead of always producing the whole curve