updates to fix bug when first number is negative