utilizing deepcopy instead of allocating immutable values by hand