That's a good start. Read the 2555 instructions, and the IRS Pub they refer you to, for additional bona fide resident criteria.