added compare subroutine for cooling