replace objects with parameters for function calls