change tags to bitmask from array for speed