added callbacks to example