added hint logic