add pretty index calculating