BUG: ex7 wrong output