add channel state related functions into galaga.js. this is just "interface"