updated tempAnalsis to run with 3 classes