pass options to serialize