Refactored 20 and added test case.