split up guided search into state pattern