throw error if scope is unknown
regenerate