Extract all features function