Added test cases, updated refrence and fixed 1 testing error