accept mixed middleware or middleware array