changed index to start centering