fix problem 5 + new solution