slightly modified defs.h