changed factory header and added header method in .c