digit conversion functions added