add logic to Hint.java