diff --git a/Files.cabal b/Files.cabal
new file mode 100644
--- /dev/null
+++ b/Files.cabal
@@ -0,0 +1,36 @@
+name:                Files
+version:             0.1.0.0
+synopsis:            File content extraction/rearrangement
+description:         Please see README.md
+homepage:            https://github.com/githubuser/Files#readme
+license:             MIT
+license-file:        LICENSE
+author:              Yuhang(Steven) Wang
+maintainer:          stevenyhw.project@gmail.com
+copyright:           2016 Yuhang(Steven) Wang
+category:            IO
+build-type:          Simple
+cabal-version:       >=1.10
+
+executable Files
+  hs-source-dirs:      src
+  main-is:             Main.hs
+  default-language:    Haskell2010
+  build-depends:       base >= 4.7 && < 5
+                     , Files 
+
+library
+    exposed-modules: Files
+    other-modules: Heads, Hello
+    hs-source-dirs: library, library/deps
+    build-depends: base >= 4.7 && < 5
+    ghc-options: -Wall
+    default-language: Haskell2010
+
+test-suite hspec
+    build-depends: base, Files, hspec
+    other-modules: HeadsSpec
+    default-language: Haskell2010
+    hs-source-dirs: test-suite
+    main-is: Spec.hs
+    type: exitcode-stdio-1.0
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016 Steven(Yuhang) Wang
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/library/Files.hs b/library/Files.hs
new file mode 100644
--- /dev/null
+++ b/library/Files.hs
@@ -0,0 +1,7 @@
+module Files 
+    ( module Heads
+    , module Hello) where
+
+import Heads
+import Hello
+
diff --git a/library/deps/Heads.hs b/library/deps/Heads.hs
new file mode 100644
--- /dev/null
+++ b/library/deps/Heads.hs
@@ -0,0 +1,11 @@
+module Heads (heads) where
+
+heads :: Int -> [String] -> IO [String]
+heads n file_names = aux file_names []
+    where
+        aux :: [String] -> [String] -> IO [String]
+        aux [] accum = return accum
+        aux (name:names) accum = do
+            content <- readFile name
+            let items = take n (lines content)
+            aux names (accum ++ items)
diff --git a/library/deps/Hello.hs b/library/deps/Hello.hs
new file mode 100644
--- /dev/null
+++ b/library/deps/Hello.hs
@@ -0,0 +1,4 @@
+module Hello (hello) where
+
+hello :: String -> String
+hello s = "Hello " ++ s ++ "!"
diff --git a/src/Main.hs b/src/Main.hs
new file mode 100644
--- /dev/null
+++ b/src/Main.hs
@@ -0,0 +1,13 @@
+module Main where
+import Files
+import System.Environment
+main :: IO ()
+main = do
+    (output:numLines:files) <- getArgs
+    let n = read numLines 
+    allLines <- heads n files
+    writeFile output (unlines allLines)
+    print (hello "Steven")
+    putStrLn "hello world"
+
+
diff --git a/test-suite/HeadsSpec.hs b/test-suite/HeadsSpec.hs
new file mode 100644
--- /dev/null
+++ b/test-suite/HeadsSpec.hs
@@ -0,0 +1,12 @@
+module HeadsSpec (spec) where
+
+import Files (heads)
+import Test.Hspec
+import Test.Hspec.QuickCheck
+
+spec :: Spec
+spec = do
+    describe "heads" $ do
+        it "returns a list top few files from many files" $ do
+            results <- heads 2 ["data/in/f1.txt", "data/in/f2.txt"]
+            results `shouldBe` ["a", "b", "1", "2"]
diff --git a/test-suite/Spec.hs b/test-suite/Spec.hs
new file mode 100644
--- /dev/null
+++ b/test-suite/Spec.hs
@@ -0,0 +1,1 @@
+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
