added and fixed some test cases