now works for negative numbers