refactored spec file