more refactoring, common record in context