added UMD middleware