passing event to follwing function