ranking function set-up completed