refactor modality and create block