refacoring guess method