updated angular code