allotment calculations working