extract or generate