added ranking value function