update function forward_search