Add testing function 
Something nasty happen during calculating rank and score