move main membership check into separate function; updates to bring in line with 2.5 core