refactoring juniper