add function for extracting rank from alignment in base class