make it compatible with the old version of php