complete assignment2
modify the function
add some description