working logic for 1 line rides only.