still wrapping head round index generation