refactor CAN extract and transmit functionality