serialize to hash part 1