additional Tom Griffing contributions
rearrange for clarity