refactored angular-app implementation