extending testcases, fixed minor bugs