Added logic to insert hints as you type