correct implementation of create documents