add shift register and callback support. UNTESTED