Passed event to function