factory syntax mistake