Add a solution suggested by yinlinglin.