- improvements and test cases