beginning of payment calculations