added frontend code to pull and display events