added fromBits and fromDigits