refactoring using passport