function transfer(address to, uint256 index) public returns (bool) {
        Loan storage loan = loans[index];
        
        require(msg.sender == loan.lender || msg.sender == loan.approvedTransfer || operators[loan.lender][msg.sender]);
        require(to != address(0));

        
        lendersBalance[loan.lender] -= 1;
        lendersBalance[to] += 1;
        Transfer(loan.lender, to, index);

        loan.lender = to;
        loan.approvedTransfer = address(0);

        return true;
    }