tidying, index working