solved problem009 and problem010