fix indexing #11