Simpler implementation of loan
Merge branch 'new'