updated with thermd.c compiling