got part 1 working. Not a hundred percent sure about the 'ind' parameter, but everything
else seems good.