merge kimi's modification