solved problem 11 -- not elegent at all...