add two case for abnormal parameter
add rand logical to test case, it funny