refactor spec file