index builder and reflect utils