refactoring to new angular version