added var to spec to tidy code a little