refactor for angular build