refactoring with polymer