a few improvements to the last commit