generated loan model