auto detect backend