removing irrelevant features and updating relevant ones