cleaning up end ramp function