urgh.  braces are inconsistent all throughout this file.