Add Proper comment and create test case for loan