Added contributions by Lijin.