updated for GridFS