merged header files/functions into common.h