made function findEvents