change call-time pass by reference as it has been deprecated in latest versions of php