Implemented rank().