replaced repetition in spec with let