angular refactoring