renamed to registerCallback