handle negative numbers