modified AcceptTokenHandler to use dict.get