change to immutable data structure