attempt number 2 at fixing indecies