Created a function called calcLiveEvent