refactor index search to seperate function. stub user_update.