tidying up adding index