problem 13, first try :D