add parameter passing functionality to injected function