made more consideration about relationship of type and immutable data structure