refactore doubles in specs