a few improvements, as suggested by @mgeier