issue with regression on j > num_values, added check for that, constant slope till then