make compatible with older versions of PHP