make adapter more generic