added loop for borrowing