stole a few more lines from fnichols