refactor code with scope, helper and partial