compatibility with older versions of php