shortened from amountRemaining to just remaining for better understanding