added evaluation logic and checking