only indice calculation functions