- simplified code.  trying to work around closure compile issue