added support for building indexes