added searhing direct instruction
changed to the selected state frame during the search