refactor to multiple indices