fixed exercise #2 bug