new testcases added, lib modified