factorized the spec file