Integrated Yumin's changes