remove unnecessary variables in specs