added hint count to the logic