added an option to serialize everything