diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index 5c6dc31..24c322e 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -200,14 +200,16 @@
 Ptr<Profile>
 ContactStorage::getSelfProfile(const Name& identity)
 {
+  _LOG_DEBUG("getSelfProfile " << identity.toUri());
   sqlite3_stmt *stmt;
   Ptr<Profile> profile = Ptr<Profile>(new Profile(identity));
   
-  sqlite3_prepare_v2(m_db, "SELECT profile_type, profile_value FROM SelfProfile WHERE profile_identity=", -1, &stmt, 0);
+  sqlite3_prepare_v2(m_db, "SELECT profile_type, profile_value FROM SelfProfile WHERE profile_identity=?", -1, &stmt, 0);
   sqlite3_bind_text(stmt, 1, identity.toUri().c_str(), identity.toUri().size(), SQLITE_TRANSIENT);
-  
-  while( sqlite3_step (stmt) == SQLITE_ROW)
+
+  while(sqlite3_step (stmt) == SQLITE_ROW)
     {
+      _LOG_DEBUG("entry");
       string profileType(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 0)), sqlite3_column_bytes (stmt, 0));
       Blob profileValue(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 1)), sqlite3_column_bytes (stmt, 1));
 
@@ -260,9 +262,35 @@
   sqlite3_bind_text(stmt, 3, selfCertificateBlob->buf(), selfCertificateBlob->size(), SQLITE_TRANSIENT);
 
   int res = sqlite3_step (stmt);
+  // _LOG_DEBUG("res " << res);
   sqlite3_finalize (stmt);
 }
 
+void 
+ContactStorage::updateAlias(const ndn::Name& identity, std::string alias)
+{
+  if(doesNormalContactExist(identity))
+    {
+      sqlite3_stmt *stmt;
+      sqlite3_prepare_v2 (m_db, "UPDATE NormalContact SET contact_alias=? WHERE contact_namespace=?", -1, &stmt, 0);
+      sqlite3_bind_text(stmt, 1, alias.c_str(), alias.size(), SQLITE_TRANSIENT);
+      sqlite3_bind_text(stmt, 2, identity.toUri().c_str(),  identity.toUri().size (), SQLITE_TRANSIENT);
+      int res = sqlite3_step (stmt);
+      sqlite3_finalize (stmt);
+      return;
+    }
+  if(doesTrustedContactExist(identity))
+    {
+      sqlite3_stmt *stmt;
+      sqlite3_prepare_v2 (m_db, "UPDATE TrustedContact SET contact_alias=? WHERE contact_namespace=?", -1, &stmt, 0);
+      sqlite3_bind_text(stmt, 1, alias.c_str(), alias.size(), SQLITE_TRANSIENT);
+      sqlite3_bind_text(stmt, 2, identity.toUri().c_str(),  identity.toUri().size (), SQLITE_TRANSIENT);
+      int res = sqlite3_step (stmt);
+      sqlite3_finalize (stmt);
+      return;
+    }
+}
+
 bool
 ContactStorage::doesContactExist(const Name& name, bool normal)
 {
