This is the core function of h-index