added onclick event to alert