latest version with in memory data base. Works fine with in memory db (little bug with the timestamps)