style improvements by @fourcolors