problem 3 solved, but still I don't like it