another round of improvements and corrections