Callback passed to function as reference