copy over from MS, adapt plugin