improved serialisation #164