it'd be cool if this could be a user-provided callback function or something controllable.