changed the code structure, code now in form of header files