add bug channel handler
try to separate handler
a problem here, i think i did not add endoder here
still failed when add encoder
do some indent to make code clear