created density bitmask
updated tests and bitmasks