compatibility with older PHP