index reader partial code.