added template params to selection::rank