support value coded, improve search + fix some bugs