Updated for signed numbers

Updated for signed numbers