support either the gmongo or jongo way of writing scripts