Begin using parameters in the retrieveEvents function