implemented new event system