extend to negative numbers