Pulls out shared_values into it's own function for chap2