Added support for bi-directional callbacks