refactoring, preparing for merge to residence calendar