Improved logic behind the hint button