be more robust
improve doc