added validation for line and stop input