fixed index update, added search method functionality