implemented if the line will cause error
implemented the case if the first number is negative