more complete code for new entries.