Updated angular controller