MASTER AGREEMENT dated as of June 21, 2004