handle negative numbers properly