changes to the addToAngular function