local dir = 2
local lane = 3
if S.dir == dir then
if atc_arrow and not S.exiting then
split_off_locomotive("B0")
set_rc("PICKUP")
set_route("HYE"..lane, "HEADSHUNT")
end

if atc_arrow and S.exiting then
set_rc("EXIT")
   set_route("HYE"..lane, "EXIT")
S.exiting = false
end
elseif atc_arrow then
atc_send("B0WD1RS4")
end