corrected Bolean Function