implement the following steps:
- fold
- unfold
- valueMap
- elementMap properly