moved setup away from constructor
Merge pull request #1232 from LorenzoBoccaccia/fix-all-the-tests

moved setup away from constructor