remove Array.isArray (this makes me feel dirty supporting ie8