removed redundant modalities array assignment