Added more logic for 20 test cases passing