use a callback to avoid stream buffering