switched stringmap back to class to match JS def