CHESS: changed if statements to elif