Added serialization in groups, not tested though!