add unittest and index builder