changed to make it compatible with older versions