fixed a small mistake with the 1 term condition