added serialise func