adding angular logic