Added write stmt and fixed parens again.