more code from qilin