fixed bugs and ramp model added

as above