refactoring proton