Merge with Meng's changes