     (let [operationStart (System/currentTimeMillis)]
       (do
         (println "użytkownik komentujący największą liczbę innych użytkowników")
-        ;(def threadHandles (HGQuery$hg/findAll @database (HGQuery$hg/type ForumThread)))
-        ;(def threadFirstPosts (map (fn [threadHandle] (reduce (fn [currentFirstThreadPostLink threadPostLink] (if (< (. currentFirstThreadPostLink getValue) (. threadPostLink getValue)) currentFirstThreadPostLink threadPostLink)) (HGQuery$hg/getAll @database (HGQuery$hg/and (into-array HGQueryCondition [(HGQuery$hg/type Long) (HGQuery$hg/incident threadHandle)])))) ) threadHandles))
         (def userHandles (HGQuery$hg/findAll @database (HGQuery$hg/type User)))
-        (def postsCount (map (fn [userHandle] (HGQuery$hg/count @database (HGQuery$hg/and (into-array HGQueryCondition [(HGQuery$hg/incident userHandle) (HGQuery$hg/type userPostRelType)])))) userHandles))
-        ;(def usersPosts (map (fn [userPostsLinks] (map (fn [userPostsLink] (HGQuery$hg/findAll @database (HGQuery$hg/and (into-array HGQueryCondition [(HGQuery$hg/target userPostsLink) (HGQuery$hg/type Post)])))) userPostsLinks)) usersPostsLinks))
-        ;(def postsCount (map (fn [userPosts] (count (filter (fn [userPost] (not (some #(= userPost %) threadFirstPosts))) userPosts))) usersPosts))
+        (def postsCount (map (fn [userHandle] (count (filter (fn [userPostLink] (= false (. userPostLink getValue))) (HGQuery$hg/getAll @database (HGQuery$hg/and (into-array HGQueryCondition [(HGQuery$hg/incident userHandle) (HGQuery$hg/type Boolean)])))))) userHandles))
         (def mostActiveUser (reduce (fn [x y] (if (> (last x) (last y)) x y)) (map vector userHandles postsCount)))
         (println (. (. @database get (first mostActiveUser)) getLogin) (last mostActiveUser))
         (println (string/join " " ["Operation took" (String/valueOf (/ (- (System/currentTimeMillis) operationStart) 1000.0)) "seconds"]))


    (def topType (. (. @database getTypeSystem) getTop))
    (def userThreadRelType (HGQuery$hg/assertAtom @database (HGRelType. "user-thread" (into-array HGHandle [topType topType]))))
    (def userPostRelType (HGQuery$hg/assertAtom @database (HGRelType. "user-post" (into-array HGHandle [topType topType]))))

    (if (= database-exists 0)
      (do

              (def postHandle (. @database add post))

              (HGQuery$hg/addUnique @database (HGRel. (into-array HGHandle [userHandle threadHandle])) userThreadRelType (HGQuery$hg/link (into-array HGHandle [userHandle threadHandle])))
              (. @database add (HGValueLink. false (into-array HGHandle [userHandle postHandle])))
              (. @database add (HGValueLink. (. (. post getCreateTime) getMillis) (into-array HGHandle [threadHandle postHandle])))

              (def saveTime (+ saveTime (- (System/currentTimeMillis) saveStart)))
