calculating amounts using proportions