add mongo utility logic for making _id into id
use mongo util to replace duplicate code