xgy's 2 methods integrated

xgy's 2 methods integrated
merged window from eason

merged window from eason