improvements in module and test cases