minor style improvements suggested by @lewis500