Added boolean array

Updated with boolean array to increase accuracy by removing false positives and negatives. Still could use some tweaking nevertheless.