added configurable serialize functions