fix code (3) & bring franco's thermal code