Working version without sending events