combine mongo, spark, freemarker