Chnaged problem 5, needs optimization