correcting serialisation bug and deprecating as we shouldn't use the id anymore