remove unused log
add author solution for exercise 5
replaced author's solution with my own