moved misc.h