Modifed mergeBits to have return value.