function fixed for -1 slope