edit events working with mongodb