initialize dictionary for data attribute if not given by caller