add event listener for mongo