nearby-events function added