stupid solution of problem 6 :D