completed ex6
completed ex6