finish assignment 5
add example codes from slides