project refactoring to use mortgages package