switched to C99 bool