add helper function for checking members in row