merge code (compare with kimi)