added serialization for modules, though it still needs to be tested.