use mongoose instead of a file