events class and basic stuff