converted demo to use mongoengine