Added functionality to show alert boxes