copied from rfid bike before they diverge too much