added functionality for signed numbers of different bases