Added negative numbers support