renamed getQuantities to getVariables and added tests