added yjk's code