events working properly