Changed to Chris Lattner's suggested approach, which