refactor the enum and transmit info