refactored an amount. Also added some terminal printouts to see whether box values are fair.