tiny improvements and corrections for all test cases