nice use of passing the reference to the callback here. very clean pattern