added xiaojing logic