added test and updated reIndex shell wrapper #389