Add alert functionality from TREEHOUSE lecture as UDEMY lecture didnt work