added #if support