fixed one bug, added aditional test cases