moved index types declarations to places they belong