file index starts at zero, not one