fixed return value for middle of slope