Added hint button and before method