handles lack of TR1 and C99