events initialization before connect event