handling negative numbers