update ranks