slightly refactored amount_due. still could use some work probably