added ranking 0 if nan