restored version with variables, not finished. Added tests for Groups. To do : weakening