update ranking algorithm