update feature logic in flatten