changed angular to use new API functions instead of old ones