init from spec