diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009, Nicolas Pouillard
+Copyright (c) 2009-2011, Nicolas Pouillard
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/deliver-to-pollbox.hs b/deliver-to-pollbox.hs
new file mode 100644
--- /dev/null
+++ b/deliver-to-pollbox.hs
@@ -0,0 +1,28 @@
+import qualified Data.ByteString.Lazy.Char8 as L8
+import Data.Char
+import Data.Maybe
+import Data.List
+import System.Environment
+import System.FilePath
+import System.IO
+import System.Directory
+
+selectDestDir :: L8.ByteString -> FilePath
+selectDestDir =
+  fromMaybe "no-destdir-header"
+    . fmap (L8.unpack . L8.drop (L8.length xdestdir))
+    . find (xdestdir `L8.isPrefixOf`)
+    . map (L8.map toLower) . L8.lines
+  where
+    xdestdir = L8.pack "x-destdir: "
+
+main :: IO ()
+main = do [arg] <- getArgs
+          input <- L8.getContents
+          let dir = arg </> selectDestDir input
+          createDirectoryIfMissing True dir
+          (_,h) <- openTempFile dir "file.log"
+          L8.hPut h input
+          hClose h
+
+-- vim: ft=haskell
diff --git a/mean.hs b/mean.hs
new file mode 100644
--- /dev/null
+++ b/mean.hs
@@ -0,0 +1,28 @@
+import System.Environment
+import Control.Monad
+import Data.Ratio
+import Numeric
+
+data P = P !Integer !Integer
+
+mean :: [Integer] -> Rational
+mean = divP . foldl f (P 0 0) where
+  f (P m s) i = P (i + m) (1 + s)
+  divP (P m s) = m % s
+
+showRat :: Rational -> String
+showRat x = showFFloat Nothing (fromRat x :: Double) ""
+
+main :: IO ()
+main = do
+  argc <- length `fmap` getArgs
+  when (argc /= 0) . fail . unlines $ ["`mean' does not expect arguments."
+                                      ,"It reads numbers from stdin and finally prints the mean"]
+  putStrLn . showRat         -- format the output
+           . mean            -- take the mean
+           . map readI       -- turns numbers into integers
+           . concatMap words -- split words
+           . lines           -- split lines
+           =<< getContents   -- reads stdin
+  where readI :: String -> Integer
+        readI = read
diff --git a/nptools.cabal b/nptools.cabal
--- a/nptools.cabal
+++ b/nptools.cabal
@@ -1,6 +1,6 @@
 Name:           nptools
 Cabal-Version:  >=1.4
-Version:        0.4.1
+Version:        0.5.0
 License:        BSD3
 License-File:   LICENSE
 Copyright:      (c) Nicolas Pouillard
@@ -67,8 +67,18 @@
     Build-depends: base>=3&&<5, filepath, SHA, MissingH
     ghc-options: -Wall -Odph
 
+executable deliver-to-pollbox
+    main-is: deliver-to-pollbox.hs
+    Build-depends: base>=3&&<5, filepath, bytestring, directory
+    ghc-options: -Wall -Odph
+
 executable summ
     main-is: summ.hs
+    Build-depends: base>=3&&<5
+    ghc-options: -Wall -Odph
+
+executable mean
+    main-is: mean.hs
     Build-depends: base>=3&&<5
     ghc-options: -Wall -Odph
 
diff --git a/show-non-ascii.hs b/show-non-ascii.hs
--- a/show-non-ascii.hs
+++ b/show-non-ascii.hs
@@ -19,5 +19,5 @@
 main :: IO ()
 main = do putStrLn "Reading from stdin"
           args <- getArgs
-          hSetEncoding stdin (if "--utf-8" `elem` args then utf8 else latin1)
+          hSetEncoding stdin (if "--latin1" `elem` args then latin1 else utf8)
           putStrLn =<< unlines . concatMap analyseLine . zip [1..] . lines <$> getContents
