compatibility with older PHP versions