improved datomic functions