added solution to the coin problem