moved getVariables to MmdWriter