modified by yibo