refactoring of newLoanController