updated logic for guess