added bits manipulation