structuring an index from a spreaded around functions to a record