added guess logic