no longer mutating first arg; changed arg checks to permit array-like objects instead of just arrays, per PR comment
tweaked md syntax per PR comment