refactored filter_cell
refactored sorting
fixs bug in name_mapping