Velocity curve code added