helper for mongo migration