Dealt with more test cases