distributing money problem