add group functionality for creating documents