bitmask: implemented popcount