some improvements to readability