updated angular controller