fix min/max mth to deal with empty lines, negative values
add cubic bezier
allow individual tuning of control points