fixed testcases
removed unused variable