updated logic in spec file