fixed calculating ndcg part. now ndcg works fine.