changed code to use ramp values as found in internet