modified by yuq