change to event rather than callback registration function; docs; tests;