Handles negative numbers