changing to be backwards compatible with old versions of php