clarify callbacks
add pseudocode example