diff --git a/modules/pubmed/EntrezPubmedArticle.php b/modules/pubmed/EntrezPubmedArticle.php
index 06b183a..36e6b0e 100644
--- a/modules/pubmed/EntrezPubmedArticle.php
+++ b/modules/pubmed/EntrezPubmedArticle.php
@@ -119,6 +119,10 @@ class BiblioEntrezPubmedArticle
       if (!empty($doi)) {
         $this->biblio['biblio_doi'] = (string)$doi[0];
       }
+      $pmcid = $this->pubmeddata->xpath('.//ArticleId[@IdType="pmc"]/text()');
+      if (!empty($pmcid)) {
+        $this->biblio['biblio_pmcid'] = (string)$pmcid[0];
+      }
     }
 
     return $this->biblio;
diff --git a/modules/pubmed/biblio_pm.install b/modules/pubmed/biblio_pm.install
index c748478..78b7113 100644
--- a/modules/pubmed/biblio_pm.install
+++ b/modules/pubmed/biblio_pm.install
@@ -7,7 +7,11 @@
 /**
  * Implementation of hook_install().
  */
+
 function biblio_pm_install() {
+
+  $result[] = _biblio_pm_types_customize_fields();
+
 }
 
 function biblio_pm_uninstall() {
@@ -17,10 +21,13 @@ function biblio_pm_uninstall() {
   variable_del('biblio_pm_update_limit');
   variable_del('biblio_pm_age_limit');
   variable_del('biblio_pm_update_next_execution');
+  db_drop_table('biblio_pubmed');
+  $result[] = _biblio_pm_remove_customized_fields();
 
 }
 
 function biblio_pm_enable() {
+  $result[] = _biblio_pm_types_customize_fields();
   biblio_pm_set_system_weight();
 }
 
@@ -46,9 +53,8 @@ function biblio_pm_schema() {
         'not null' => TRUE
       ),
       'biblio_pmcid' => array(
-        'type'     => 'int',
-        'not null' => TRUE,
-        'default'  => 0,
+        'type'     => 'char',
+        'length' => 20,
       ),
         'nid' => array(
         'type' => 'int',
@@ -73,6 +79,115 @@ function biblio_pm_schema() {
 
 /**
 *
+* Removes biblio_pubmed_id and biblio_pmcid columns into main biblio tables
+* Drops biblio_pubmed table
+*
+*/
+function _biblio_pm_remove_customized_fields() {
+   $fields = array("biblio_pubmed_id","biblio_pmcid");
+   foreach ($fields as &$field) {
+
+      if ($field == "biblio_pubmed_id") {
+         $name = "PubMed ID";
+      } else if ($field == "biblio_pmcid") {
+         $name = "PubMed Central ID";
+      }
+      $db_result = db_query("DELETE from {biblio_field_type_data} WHERE title = :name",array(':name' => $name));
+     
+      // reset ftdid variable, only has effect if the pubmed variables are the hightest
+      $sql = 'SELECT ftdid FROM {biblio_field_type_data} ORDER BY ftdid DESC LIMIT 1';
+      $db_result = db_query($sql);
+      foreach ($db_result as $record) {
+         $lastftdid = $record -> ftdid;
+      }
+      variable_set('biblio_last_ftdid', $lastftdid); //reset ftdid variable
+
+      $db_result = db_query("SELECT fid from {biblio_fields} WHERE name = :name",array(':name' => $field));
+      foreach ($db_result as $record) {
+         $biblio_fid = $record->fid;
+      }
+      if (isset($biblio_fid)) {
+         $db_result = db_query("DELETE from {biblio_fields} WHERE name = :name",array(':name' => $field));
+         $db_result = db_query("DELETE from {biblio_field_type} WHERE fid = :fid",array(':fid' => $biblio_fid));
+      }
+   }
+}
+   
+/**
+*
+* Insert columns into main biblio tables, so that the new ids can get displayed 
+*
+*/
+function _biblio_pm_types_customize_fields() {
+
+  // biblio_field_type_data defines the entry
+
+   $fields = array("biblio_pubmed_id","biblio_pmcid");
+
+   foreach ($fields as &$field) {
+      unset($biblio_fid,$biblio_tid,$biblio_ftdid);
+      if ($field == "biblio_pubmed_id") {
+         $name = "PubMed ID";
+      } else if ($field == "biblio_pmcid") {
+         $name = "PubMed Central ID";
+      }
+
+      $db_result = db_query("SELECT ftdid from {biblio_field_type_data} WHERE title = :name",array(':name' => $name));
+      foreach ($db_result as $record) {
+         $biblio_ftdid = $record->ftdid;
+      }
+      if (!isset($biblio_ftdid)) {
+         $biblio_ftdid = variable_get('biblio_last_ftdid', 100); 
+         $biblio_ftdid++;
+         db_query("INSERT INTO {biblio_field_type_data} (ftdid, title, hint) VALUES (:biblio_ftdid, :name, '')",
+                  array(':biblio_ftdid' => $biblio_ftdid, ':name' => $name ));
+         variable_set('biblio_last_ftdid', $biblio_ftdid); //increment the field type data id by one.
+      } 
+   
+     // biblio_fields defines the variable names and the data type
+   
+      $db_result = db_query("SELECT fid from {biblio_fields} WHERE name = :name",array(':name' => $field));
+      foreach ($db_result as $record) {
+         $biblio_fid = $record->fid;
+      }
+      if (!isset($biblio_fid)) {
+         $sql = 'SELECT fid FROM {biblio_fields} ORDER BY fid DESC LIMIT 1';
+         $db_result = db_query($sql);
+         foreach ($db_result as $record) {
+            $lastfid = $record -> fid;
+         }
+         $biblio_fid  = $lastfid + 1;
+         db_query("INSERT INTO {biblio_fields} (fid, name, type, size, maxsize) VALUES (:fid, :name, :type, :size, :maxsize)",
+                  array(':fid' => $biblio_fid, ':name' => $field, ':type' => "textfield", ':size' => 60, ':maxsize' => 255));
+      } 
+   
+     // biblio_field_type connects the two tables, and enables the viewing of the field for the different content types
+     // 102 is the content type (tid) for Journal Article, the most common for PMID and PMCID (http://www.ncbi.nlm.nih.gov/pmc/about/faq)
+
+     $biblio_tid = 102;
+     // first check whether the row already exists (primary key: tid, fid)
+      $db_result = db_query("SELECT tid from {biblio_field_type} WHERE tid = :tid and fid = :fid",array(':tid' => $biblio_tid, ':fid' => $biblio_fid));
+      foreach ($db_result as $record) {
+         $biblio_tid_exists = $record->tid;
+      }
+     // now insert - vtab 4 (Identifiers)
+      if (!isset($biblio_tid_exists)) {
+         db_query("INSERT INTO {biblio_field_type} (tid, fid, ftdid, cust_tdid, common, vtab, autocomplete,
+                   required, weight, visible) values (:biblio_tid, :biblio_fid, :biblio_ftdid, :biblio_ftdid, 1, 4, 0, 0, 160, 0)",
+                   array(':biblio_tid' => $biblio_tid, ':biblio_fid' => $biblio_fid, ':biblio_ftdid' => $biblio_ftdid));
+      }
+   }
+}
+
+/** 
+*
+* UPDATES
+*
+*/
+
+
+/**
+*
 * add two new fields to the biblio_pubmed table
 *
 */
@@ -91,5 +206,27 @@ function biblio_pm_update_7001() {
     'default'  => 0,
   );
   db_add_field('biblio_pubmed', 'biblio_pmcid', $spec);
+}
+/**
+*
+* change field type for biblio_pmcid field to the biblio_pubmed table
+*
+*/
+
+function biblio_pm_update_7002() {
+  $spec =  array(
+    'type'     => 'char(20)',
+    'not null' => FALSE,
+  );
+  db_change_field('biblio_pubmed', 'biblio_pmcid', $spec);
+}
+
+/**
+*
+* add or update rows in the main biblio tables
+* (to be copied from above)
+*/
+
+function biblio_pm_update_7003() {
+}
 
-}
\ No newline at end of file
diff --git a/modules/pubmed/biblio_pm.module b/modules/pubmed/biblio_pm.module
index 6b03d63..d896ee1 100644
--- a/modules/pubmed/biblio_pm.module
+++ b/modules/pubmed/biblio_pm.module
@@ -45,9 +45,9 @@ function biblio_pm_cron() {
 
           $now = time();
 
-          db_update('biblio_pubmed')
-            ->fields(array('biblio_pm_changed' => $now))
-            ->condition('nid', $dups, 'IN')
+          db_update('biblio_pubmed')
+            ->fields(array('biblio_pm_changed' => $now))
+            ->condition('nid', $dups, 'IN')
             ->execute();
         }
       }
@@ -66,7 +66,49 @@ function biblio_pm_form_biblio_admin_settings_alter(&$form, &$form_state) {
   module_load_include('inc', 'biblio_pm', 'biblio_pm.admin');
   $form += biblio_pm_settings_form();
 }
+
 function biblio_pm_form_biblio_node_form_alter(&$form, &$form_state, $form_id) {
+
+  if (($form_id == 'biblio_node_form') && isset($form_state['biblio_fields'])) {
+
+     if (isset($form_state['values']['biblio_pubmed_id'])) {
+        $default_pubmed_id = $form_state['values']['biblio_pubmed_id']; 
+     } else if (isset($form_state['node']->biblio_pubmed_id))  {
+        $default_pubmed_id = $form_state['node']->biblio_pubmed_id ;
+     } else {
+        $default_pubmed_id = '';
+     }
+
+     if (isset($form_state['values']['biblio_pmcid'])) {
+        $default_pmcid = $form_state['values']['biblio_pmcid']; 
+     } else if (isset($form_state['node']->biblio_pmcid))  {
+        $default_pmcid = $form_state['node']->biblio_pmcid ;
+     } else {
+        $default_pmcid = '';
+     }
+
+     $form['biblio_tabs'][4]['biblio_pubmed_id'] = array(
+        '#type' => 'textfield',
+        '#title' => t('PMID'),
+        '#required' => FALSE,
+        '#description' => t('PubMed ID'),
+        '#default_value' => $default_pubmed_id,
+        '#size' => 50,
+        '#maxlength' => 50,
+      );
+
+
+     $form['biblio_tabs'][4]['biblio_pmcid'] = array(
+        '#type' => 'textfield',
+        '#title' => t('PMCID'),
+        '#required' => FALSE,
+        '#description' => t('PubMed Central ID'),
+        '#default_value' => $default_pmcid,
+        '#size' => 50,
+        '#maxlength' => 50,
+      );
+
+  }
   if ((!isset($form_state['biblio_type']) || empty($form_state['biblio_type'])) && !isset($form_state['node']->nid)) {
     $form['biblio_pubmed_lookup'] = array(
         '#type' => 'fieldset',
@@ -99,6 +141,10 @@ function biblio_pm_form_biblio_node_form_alter(&$form, &$form_state, $form_id) {
   if (isset($form_state['values']['biblio_pubmed_md5'])) {
     $form['biblio_pubmed_md5'] = array('#type' => 'value', '#value' => $form_state['values']['biblio_pubmed_md5']);
   }
+  if (isset($form_state['values']['biblio_pmcid'])) {
+    $form['biblio_pmcid'] = array('#type' => 'value', '#value' => $form_state['values']['biblio_pmcid']);
+  }
+  
 }
 
 function biblio_pm_form_biblio_node_form_submit($form, &$form_state) {
@@ -133,15 +179,17 @@ function biblio_pm_form_biblio_node_form_submit($form, &$form_state) {
   if (!empty($node_data)) {
     $form_state['values'] = array_merge($form_state['values'], $node_data);
     $form_state['input']['biblio_type'] = $form_state['biblio_type'] = $node_data['biblio_type'];
+    $form_state['input']['biblio_pmcid'] = $form_state['biblio_pmcid'] = $node_data['biblio_pmcid'];
+    $form_state['input']['biblio_pubmed_id'] = $form_state['biblio_pubmed_id'] = $node_data['biblio_pubmed_id'];
     $form_state['rebuild'] = TRUE;
   }
 
-    return;
+  return;
 }
 
 function biblio_pm_biblio_import_options() {
   return array(
-  	'biblio_pm'  => t('PubMed ID List'),
+    'biblio_pm'  => t('PubMed ID List'),
     'biblio_pm_xml' => t('PubMed XML')
   );
 }
@@ -343,14 +391,15 @@ function biblio_pm_node_update($node) {
 }
 
 function biblio_pm_node_load($nodes, $types) {
-    $result = db_select('biblio_pubmed', 'bpm')
-          ->fields('bpm', array('nid', 'biblio_pubmed_id'))
+  $result = db_select('biblio_pubmed', 'bpm')
+          ->fields('bpm', array('nid', 'biblio_pubmed_id', 'biblio_pmcid'))
           ->condition('nid', array_keys($nodes))
           ->execute();
 
- // $result = db_query('SELECT  biblio_pubmed_id  FROM {biblio_pubmed} WHERE nid IN(:nids)', array(':nids' => array_keys($nodes)));
+// $result = db_query('SELECT  biblio_pubmed_id  FROM {biblio_pubmed} WHERE nid IN(:nids)', array(':nids' => array_keys($nodes)));
   foreach ($result as $record) {
     $nodes[$record->nid]->biblio_pubmed_id = $record->biblio_pubmed_id;
+    $nodes[$record->nid]->biblio_pmcid = $record->biblio_pmcid;
   }
 }
 
diff --git a/modules/pubmed/biblio_pm.views.inc b/modules/pubmed/biblio_pm.views.inc
index 4a1781f..f16a48c 100644
--- a/modules/pubmed/biblio_pm.views.inc
+++ b/modules/pubmed/biblio_pm.views.inc
@@ -2,17 +2,43 @@
 function biblio_pm_views_data() {
 
   $data['biblio_pubmed']['table']['group']  = t('Biblio');
+  $data['biblio_pubmed']['table']['base']  = array(
+      'field' => 'nid',
+      'title' => t('PubMed Table'),
+      'help' => t('This table contains PubMed Identifiers'),
+      'weight' => 10,
+  );
+
   $data['biblio_pubmed']['table']['join'] = array(
       'node' => array(
           'left_field' => 'nid',
           'field' => 'nid',
       ),
   );
+
   $data['biblio_pubmed']['biblio_pubmed_id'] = array(
       'title' => t('PubMed ID'),
-      'help' => t('The PubMed ID'),
+      'help' => t('The PubMed ID (http://pubmed.org)'),
+      'field' => array(
+          'handler' => 'views_handler_field',
+          'click sortable' => TRUE,
+      ),
+      'sort' => array(
+          'handler' => 'views_handler_sort',
+      ),
+      'filter' => array(
+          'handler' => 'views_handler_filter_integer',
+      ),
+      'argument' => array(
+          'handler' => 'views_handler_argument_integer',
+      ),
+
+  );
+  $data['biblio_pubmed']['biblio_pmcid'] = array(
+      'title' => t('PMCID'),
+      'help' => t('The PubMed Central ID (http://www.ncbi.nlm.nih.gov/pmc/)'),
       'field' => array(
-          'handler' => 'views_handler_field_string',
+          'handler' => 'views_handler_field',
           'click sortable' => TRUE,
       ),
       'sort' => array(
@@ -22,10 +48,11 @@ function biblio_pm_views_data() {
           'handler' => 'views_handler_filter_string',
       ),
       'argument' => array(
-          'handler' => 'views_handler_argument',
+          'handler' => 'views_handler_argument_string',
       ),
 
   );
 
   return $data;
 }
+
