added conditional for past vs upcoming events