events now working as well