rst: added rank level algorithm