indices should be stored as unsigned int