Use event instead of var