diff --git a/NanoProlog.cabal b/NanoProlog.cabal
--- a/NanoProlog.cabal
+++ b/NanoProlog.cabal
@@ -1,5 +1,5 @@
 Name:                NanoProlog
-Version:             0.2.1
+Version:             0.2.2
 Synopsis:            Very small  interpreter for a Prolog-like language
 Description:         This package was developed to demonstrate the ideas behind
                      the Prolog language. It contains a very small interpreter
@@ -31,6 +31,7 @@
 
 Library
   Build-Depends:	  base >= 4.0 && < 5.0,
+                    haskell98 >= 1.1.0.1,
                     uu-parsinglib >= 2.7.1,
                     ListLike == 3.1.*,
                     containers == 0.4.*
diff --git a/royals.pro b/royals.pro
--- a/royals.pro
+++ b/royals.pro
@@ -13,6 +13,12 @@
 ma(max,ale).
 ma(max,ama).
 ma(max,ari).
+ma(bea,con).
+ma(bea,fri).
+
+elem(X, cons(X,Y)).
+elem(X, cons(Z,Y)) :- elem (X, Y).
+man(X) :- elem(X, cons(claus, cons(alex, cons(con, cons(fri, empty))))).
 
 ouder(X,Y) :- pa(X,Y).
 ouder(X,Y) :- ma(X,Y).
diff --git a/src/Language/Prolog/NanoProlog/Interpreter.hs b/src/Language/Prolog/NanoProlog/Interpreter.hs
--- a/src/Language/Prolog/NanoProlog/Interpreter.hs
+++ b/src/Language/Prolog/NanoProlog/Interpreter.hs
@@ -2,6 +2,7 @@
 
 import            Language.Prolog.NanoProlog.NanoProlog
 import            Text.ParserCombinators.UU
+import            System (getArgs)
 import            System.IO
 
 -- * Running the Interpreter
@@ -9,10 +10,13 @@
 -- | The `main` program prompt for a file with Prolog rules and call the main
 -- interpreter loop
 run :: IO ()
-run =  do  hSetBuffering stdin LineBuffering
-           putStrLn "File with rules?"
-           fn  <- getLine
-           s   <- readFile fn
+run =  do  args  <- getArgs
+           fn    <- case args of
+                      []     -> do  hSetBuffering stdin LineBuffering
+                                    putStrLn "File with rules?"
+                                    getLine
+                      (x:_)  -> return x
+           s     <- readFile fn
            let (rules, errors) = startParse (pList pRule) s
            if null errors  then  do  mapM_ print rules
                                      loop rules
diff --git a/src/Language/Prolog/NanoProlog/NanoProlog.hs b/src/Language/Prolog/NanoProlog/NanoProlog.hs
--- a/src/Language/Prolog/NanoProlog/NanoProlog.hs
+++ b/src/Language/Prolog/NanoProlog/NanoProlog.hs
@@ -101,9 +101,9 @@
            |  otherwise                         = Nothing
 
 solve :: [Rule] -> Maybe Env  -> [TaggedTerm] -> Result
-solve _      Nothing   _        = ApplyRules []
-solve _      (Just e)    []     = Done e
-solve rules  e  ((tg,t):ts)  = ApplyRules
+solve _      Nothing   _            = ApplyRules []
+solve _      (Just e)  []           = Done e
+solve rules  e         ((tg,t):ts)  = ApplyRules
   [  let  cts = map ((tg ++) . ('.' :) . show) ([1..] :: [Int]) `zip` cs ++ ts
      in   (tg, rule, solve rules (unify (t, c) e) cts)
   |  rule@(c :<-: cs)  <- tag tg rules
