Refactored 36 and added test case.