adding support for multiple callbacks