pass function reference.