#1 generate indexes