detect value in output better