Added borrow feature and error message functionality