added get_as_dict for context data