implementation can switch between 'safe' and 'unsafe' indexing- 'unsafe' used for optimisation