straight forward conversion to filemakerstandards.org coding style - no changes in logic