"fixed the infanite loop errer in the boolean function"