incorporate Kai's ideas