tweaked common use example
fixed bug in index indexing and updated unittest