use get opt and make it possible to run without writing to mongodb