A Model Of How Competitive Markets Work