adding a parameter to list the fields to serialize