returning the extracted entities

Adding the missing return statement of extracted entities