renamed function call to rename_space instead of add_element when replacing all elements in the prob and sample space.