graph head file and main source file