serialize to maps