diff --git a/client/client.cc b/client/client.cc
index 8ab8013..df827ba 100644
--- a/client/client.cc
+++ b/client/client.cc
@@ -93,19 +93,13 @@
               if (ok == 0)
                 {
                   // Alex: the following code is platform specific :(
-                  
-                  char atimespec[26], mtimespec[26], ctimespec[26];
-                  ctime_r (&fileStats.st_atime, atimespec);
-                  ctime_r (&fileStats.st_mtime, mtimespec);
-                  ctime_r (&fileStats.st_ctime, ctimespec);
-
                   HashPtr fileHash = Hash::FromFileContent (argv[2]);
                   
                   notify->updateFile (argv[2],
                                       make_pair(reinterpret_cast<const ::Ice::Byte*> (fileHash->GetHash ()),
                                                 reinterpret_cast<const ::Ice::Byte*> (fileHash->GetHash ()) +
                                                 fileHash->GetHashBytes ()),
-                                      atimespec, mtimespec, ctimespec,
+                                      fileStats.st_atime, fileStats.st_mtime, fileStats.st_ctime,
                                       fileStats.st_mode);
                 }
               else
diff --git a/daemon/notify-i.cc b/daemon/notify-i.cc
index 0f8b004..43aa32e 100644
--- a/daemon/notify-i.cc
+++ b/daemon/notify-i.cc
@@ -32,9 +32,9 @@
 void
 NotifyI::updateFile (const ::std::string &filename,
                      const ::std::pair<const Ice::Byte*, const Ice::Byte*> &hashRaw,
-                     const ::std::string &atime,
-                     const ::std::string &mtime,
-                     const ::std::string &ctime,
+                     ::Ice::Long atime,
+                     ::Ice::Long mtime,
+                     ::Ice::Long ctime,
                      ::Ice::Int mode,
                      const ::Ice::Current&)
 {
diff --git a/daemon/notify-i.h b/daemon/notify-i.h
index a2cea97..42d4d7e 100644
--- a/daemon/notify-i.h
+++ b/daemon/notify-i.h
@@ -32,9 +32,9 @@
   virtual void
   updateFile (const ::std::string &filename,
               const ::std::pair<const Ice::Byte*, const Ice::Byte*> &hash,
-              const ::std::string &atime,
-              const ::std::string &mtime,
-              const ::std::string &ctime,
+              ::Ice::Long atime,
+              ::Ice::Long mtime,
+              ::Ice::Long ctime,
               ::Ice::Int mode,
               const ::Ice::Current& = ::Ice::Current());
 
diff --git a/include/ccnx-wrapper.h b/include/ccnx-wrapper.h
index 9b50ae8..4b9b3dd 100644
--- a/include/ccnx-wrapper.h
+++ b/include/ccnx-wrapper.h
@@ -60,9 +60,8 @@
   static string
   extractName(const unsigned char *data, const ccn_indexbuf *comps);
 
-protected:
   Bytes
-  createContentObject(const string &name, const unsigned char *buf, size_t len, int freshness);
+  createContentObject(const string &name, const unsigned char *buf, size_t len, int freshness = 2147/* max value for ccnx*/);
 
   int
   putToCcnd (const Bytes &contentObject);
diff --git a/src/action-item.proto b/src/action-item.proto
new file mode 100644
index 0000000..6d50065
--- /dev/null
+++ b/src/action-item.proto
@@ -0,0 +1,22 @@
+message ActionItem
+{
+  enum ActionType
+  {
+    UPDATE = 0;
+    DELETE = 1;
+  }
+  required ActionType action = 3;
+
+  required string filename = 4;
+  required uint64 version = 5;
+  required uint32 timestamp = 6;
+
+  optional bytes  file_hash = 7;
+  optional uint32 atime = 8;
+  optional uint32 mtime = 9;
+  optional uint32 ctime = 10;
+  optional uint32 mode  = 11;
+
+  optional string parent_device_name = 12;
+  optional uint64 parent_seq_no = 13;
+}
diff --git a/src/action-log.cc b/src/action-log.cc
index cf5156a..6d0c48b 100644
--- a/src/action-log.cc
+++ b/src/action-log.cc
@@ -20,50 +20,110 @@
  */
 
 #include "action-log.h"
+#include <action-item.pb.h>
 
 using namespace boost;
 using namespace std;
 
 ActionLog::ActionLog (const std::string &path, const std::string &localName)
-  : SyncLog (path)
-  , m_localName (localName)
+  : SyncLog (path, localName)
 {
 }
 
+tuple<sqlite3_int64, sqlite3_int64, sqlite3_int64>
+ActionLog::GetExistingRecord (const std::string &filename)
+{
+  // check if something already exists
+  sqlite3_stmt *stmt;
+  int res = sqlite3_prepare_v2 (m_db, "SELECT version,device_id,seq_no FROM ActionLog WHERE filename=? ORDER BY version DESC,device_id DESC LIMIT 1", -1, &stmt, 0);
+
+  if (res != SQLITE_OK)
+    {
+      BOOST_THROW_EXCEPTION (Error::Db ()
+                             << errmsg_info_str ("Some error with AddActionUpdate"));
+    }
+
+  sqlite3_bind_text (stmt, 1, filename.c_str (), filename.size (), SQLITE_STATIC);
+  if (sqlite3_step (stmt) == SQLITE_ROW)
+    {
+      // with parent with version number + 1
+      sqlite3_int64 version = sqlite3_column_int64 (stmt, 0) + 1;
+      sqlite3_int64 parent_device_id = sqlite3_column_int64 (stmt, 1);
+      sqlite3_int64 parent_seq_no = sqlite3_column_int64 (stmt, 0);
+
+      sqlite3_finalize (stmt);
+      return make_tuple (version, parent_device_id, parent_seq_no);
+    }
+
+  sqlite3_finalize (stmt);
+  return make_tuple ((sqlite3_int64)0, (sqlite3_int64)-1, (sqlite3_int64)-1);
+}
+
 // local add action. remote action is extracted from content object
 void
 ActionLog::AddActionUpdate (const std::string &filename,
                             const Hash &hash,
-                            const std::string &atime, const std::string &mtime, const std::string &ctime,
+                            time_t atime, time_t mtime, time_t ctime,
                             int mode)
 {
   int res = sqlite3_exec (m_db, "BEGIN TRANSACTION;", 0,0,0);
+  
+  sqlite3_int64 seq_no = GetNextLocalSeqNo ();
+  sqlite3_int64 version = 0;
+  sqlite3_int64 parent_device_id = -1;
+  sqlite3_int64 parent_seq_no = -1;
 
-  // sqlite3_stmt *stmt;
-  // res += sqlite3_prepare_v2 (m_db, "SELECT version,device_id,seq_no FROM ActionLog WHERE filename=? ORDER BY version DESC,device_id DESC LIMIT 1", -1, &stmt, 0);
+  sqlite3_int64 action_time = time (0);
+  
+  tie (version, parent_device_id, parent_seq_no) = GetExistingRecord (filename);
+  
+  sqlite3_stmt *stmt;
+  sqlite3_prepare_v2 (m_db, "INSERT INTO ActionLog "
+                      "(device_id, seq_no, action, filename, version, action_timestamp, "
+                      "file_hash, file_atime, file_mtime, file_ctime, file_chmod, "
+                      "parent_device_id, parent_seq_no) "
+                      "VALUES (?, ?, ?, ?, ?, datetime(?, 'unixepoch'),"
+                      "        ?, datetime(?, 'unixepoch'), datetime(?, 'unixepoch'), datetime(?, 'unixepoch'), ?,"
+                      "        ?, ?)", -1, &stmt, 0);
 
-  // if (res != SQLITE_OK)
-  //   {
-  //     BOOST_THROW_EXCEPTION (Error::Db ()
-  //                            << errmsg_info_str ("Some error with AddActionUpdate"));
-  //   }
+  sqlite3_bind_int64 (stmt, 1, m_localDeviceId);
+  sqlite3_bind_int64 (stmt, 2, seq_no);
+  sqlite3_bind_int   (stmt, 3, 0);
+  sqlite3_bind_text  (stmt, 4, filename.c_str (), filename.size (), SQLITE_TRANSIENT);
+  sqlite3_bind_blob  (stmt, 5, hash.GetHash (), hash.GetHashBytes (), SQLITE_TRANSIENT);
 
-  // sqlite3_bind_text (stmt, 1, filename.c_str (), -1);
-  // if (sqlite3_step (stmt) == SQLITE_ROW)
-  //   {
-  //     // with parent
-  //     sqlite3_int64 version = sqlite3_value_int64 (stmt, 0) + 1;
-  //     sqlite3_int64 device_id = sqlite3_value_int64 (stmt, 1);
-  //     sqlite3_int64 seq_no = sqlite3_value_int64 (stmt, 0);
+  sqlite3_bind_int64 (stmt, 6, action_time);
+  
+  sqlite3_bind_int64 (stmt, 7, atime);
+  sqlite3_bind_int64 (stmt, 8, mtime);
+  sqlite3_bind_int64 (stmt, 9, ctime);
+  sqlite3_bind_int   (stmt, 10, mode);
 
-      
-  //   }
-  // else
-  //   {
-  //     // without parent
-      
-  //   }
+  if (parent_device_id > 0 && parent_seq_no > 0)
+    {
+      sqlite3_bind_int64 (stmt, 11, parent_device_id);
+      sqlite3_bind_int64 (stmt, 12, parent_seq_no);
+    }
+  else
+    {
+      sqlite3_bind_null (stmt, 11);
+      sqlite3_bind_null (stmt, 12);
+    }
+  
+  sqlite3_step (stmt);
 
+  // missing part: creating ContentObject for the action !!!
+
+  ActionItem item;
+  item.set_action (ActionItem::UPDATE);
+  item.set_filename (filename);
+  item.set_version (version);
+  item.set_timestamp (action_time);
+  item.set_file_hash (hash.GetHash (), hash.GetHashBytes ());
+  // item
+  
+  sqlite3_finalize (stmt); 
+                          
   res += sqlite3_exec (m_db, "END TRANSACTION;", 0,0,0);
 }
 
diff --git a/src/action-log.h b/src/action-log.h
index 6827cba..0ffd64f 100644
--- a/src/action-log.h
+++ b/src/action-log.h
@@ -23,29 +23,30 @@
 #define ACTION_LOG_H
 
 #include "sync-log.h"
+#include <boost/tuple/tuple.hpp>
 
 class ActionLog : public SyncLog
 {
 public:
   ActionLog (const std::string &path, const std::string &localName);
 
-  
-  
-  
   void
   AddActionUpdate (const std::string &filename,
-                        const Hash &hash,
-                        const std::string &atime, const std::string &mtime, const std::string &ctime,
-                        int mode);
+                   const Hash &hash,
+                   time_t atime, time_t mtime, time_t ctime,
+                   int mode);
 
   void
   AddActionMove (const std::string &oldFile, const std::string &newFile);
-
+  
   void
   AddActionDelete (const std::string &filename);
+
+private:
+  boost::tuple<sqlite3_int64, sqlite3_int64, sqlite3_int64>
+  GetExistingRecord (const std::string &filename);
   
 protected:
-  std::string m_localName;
 };
 
 #endif // ACTION_LOG_H
diff --git a/src/chronoshare-client.ice b/src/chronoshare-client.ice
index be40c3e..e3bf8e2 100644
--- a/src/chronoshare-client.ice
+++ b/src/chronoshare-client.ice
@@ -25,7 +25,7 @@
   
   interface Notify 
   {
-    void updateFile (string filename, ["cpp:array"] HashBytes fileHash, string atime, string mtime, string ctime, int mode);
+    void updateFile (string filename, ["cpp:array"] HashBytes fileHash, long atime, long mtime, long ctime, int mode);
 
     void moveFile (string origFilename, string newFilename);
 
diff --git a/src/sync-log.cc b/src/sync-log.cc
index 3e49c69..93d4a3e 100644
--- a/src/sync-log.cc
+++ b/src/sync-log.cc
@@ -26,6 +26,51 @@
 using namespace boost;
 using namespace std;
 
+SyncLog::SyncLog (const std::string &path, const std::string &localName)
+  : DbHelper (path)
+  , m_localName (localName)
+{
+  UpdateDeviceSeqno (localName, 0);
+  
+  sqlite3_stmt *stmt;
+  int res = sqlite3_prepare_v2 (m_db, "SELECT device_id, seq_no FROM SyncNodes WHERE device_name=?", -1, &stmt, 0);
+  sqlite3_bind_text (stmt, 1, m_localName.c_str (), m_localName.size (), SQLITE_STATIC);
+
+  if (sqlite3_step (stmt) == SQLITE_ROW)
+    {
+      m_localDeviceId = sqlite3_column_int64 (stmt, 0);
+    }
+  else
+    {
+      BOOST_THROW_EXCEPTION (Error::Db ()
+                             << errmsg_info_str ("Impossible thing in SyncLog::SyncLog"));
+    }
+  sqlite3_finalize (stmt);
+}
+
+
+sqlite3_int64
+SyncLog::GetNextLocalSeqNo ()
+{
+  sqlite3_stmt *stmt_seq;
+  sqlite3_prepare_v2 (m_db, "SELECT seq_no FROM SyncNodes WHERE device_id = ?", -1, &stmt_seq, 0);
+  sqlite3_bind_int64 (stmt_seq, 1, m_localDeviceId);
+
+  if (sqlite3_step (stmt_seq) != SQLITE_ROW)
+    {
+      BOOST_THROW_EXCEPTION (Error::Db ()
+                             << errmsg_info_str ("Impossible thing in ActionLog::AddActionUpdate"));
+    }
+  
+  sqlite3_int64 seq_no = sqlite3_column_int64 (stmt_seq, 0) + 1; 
+  sqlite3_finalize (stmt_seq);
+
+  UpdateDeviceSeqNo (m_localDeviceId, seq_no);
+  
+  return seq_no;
+}
+
+
 HashPtr
 SyncLog::RememberStateInStateLog ()
 {
@@ -130,7 +175,7 @@
 }
 
 void
-SyncLog::UpdateDeviceSeqno (const std::string &name, uint64_t seqNo)
+SyncLog::UpdateDeviceSeqno (const std::string &name, sqlite3_int64 seqNo)
 {
   sqlite3_stmt *stmt;
   // update is performed using trigger
@@ -144,11 +189,32 @@
   if (res != SQLITE_OK)
     {
       BOOST_THROW_EXCEPTION (Error::Db ()
-                             << errmsg_info_str ("Some error with UpdateDeviceSeqno"));
+                             << errmsg_info_str ("Some error with UpdateDeviceSeqno (name)"));
     }
   sqlite3_finalize (stmt);
 }
 
+void
+SyncLog::UpdateDeviceSeqNo (sqlite3_int64 deviceId, sqlite3_int64 seqNo)
+{
+  sqlite3_stmt *stmt;
+  // update is performed using trigger
+  int res = sqlite3_prepare (m_db, "INSERT INTO SyncNodes (device_id, seq_no) VALUES (?,?);", 
+                             -1, &stmt, 0);
+
+  res += sqlite3_bind_int64 (stmt, 1, deviceId);
+  res += sqlite3_bind_int64 (stmt, 2, seqNo);
+  sqlite3_step (stmt);
+  
+  if (res != SQLITE_OK)
+    {
+      BOOST_THROW_EXCEPTION (Error::Db ()
+                             << errmsg_info_str ("Some error with UpdateDeviceSeqNo (id)"));
+    }
+  sqlite3_finalize (stmt);
+}
+
+
 SyncStateMsgPtr
 SyncLog::FindStateDifferences (const std::string &oldHash, const std::string &newHash)
 {
diff --git a/src/sync-log.h b/src/sync-log.h
index 5705e45..bef41a7 100644
--- a/src/sync-log.h
+++ b/src/sync-log.h
@@ -30,14 +30,17 @@
 class SyncLog : public DbHelper
 {
 public:
-  SyncLog (const std::string &path)
-    : DbHelper (path)
-  {
-  }
+  SyncLog (const std::string &path, const std::string &localName);
 
+  sqlite3_int64
+  GetNextLocalSeqNo (); // side effect: local seq_no will be increased
+
+  void
+  UpdateDeviceSeqNo (sqlite3_int64 deviceId, sqlite3_int64 seqNo);
+  
   // done
   void
-  UpdateDeviceSeqno (const std::string &name, uint64_t seqNo);
+  UpdateDeviceSeqno (const std::string &name, sqlite3_int64 seqNo);
 
   // std::string
   // LookupForwardingAlias (const std::string &deviceName);
@@ -66,6 +69,11 @@
 
   SyncStateMsgPtr
   FindStateDifferences (const Hash &oldHash, const Hash &newHash);  
+
+protected:
+  std::string m_localName;
+  sqlite3_int64 m_localDeviceId;
+  
 };
 
 
diff --git a/wscript b/wscript
index f221147..4c6b7c5 100644
--- a/wscript
+++ b/wscript
@@ -111,6 +111,7 @@
                   'src/sync-log.cc',
                   'src/action-log.cc',
                   'src/sync-state.proto',
+                  'src/action-item.proto',
                   ],
         use = "BOOST CCNX SSL SQLITE3 ICE common",
         includes = ['include', 'src'],
