changed to boolean array
Fixed merge conflicts