first version to add the serializable implementation