now compatible with older php