CSD-36: Code changes from Hongyu Shan