starting to add the loan pattern to api - more cleaner